function figcaption($) {
    $('.figcap').each(function (i) {
        var img_ = $('img', this);
        var img_height = img_.attr('height');
        var p_height = $('h3, span', this).outerHeight();
        $(this).height(img_height);
        $(this).hover(function () {
            img_.animate({
                marginTop: -p_height
            }, 500);
        }, function () {
            img_.animate({
                marginTop: '0'
            }, 500);
        });
    });
}

function ranabout() {
    $('#featured ul').roundabout({
        easing: 'easeOutInCirc',
        duration: 600,
        btnNext: '#next',
        btnPrev: '#previous',
        easing: 'easeOutExpo'
    }).each(function () {
        $(this).css('display', 'block');
    });
}

function query() {
    var user = $('li.myroundabout').find('img').attr('alt');
    if (user != null) {
        $('#description').html(user).hide(200).toggle(200);
        $('li.myroundabout').focus(function () {
            var user = $(this).find('img').attr('alt');
            $('#description').html(user).hide(200).toggle(200);
        });
    }
}

function relcarou() {
    $('#foo').carouFredSel({
        items: 4,
        direction: 'left',
        auto: false,
        prev: '#foo_prev',
        next: '#foo_next',
        scroll: {
            items: 2,
            easing: 'easeOutBack',
            duration: 1000
        }
    });
}

function sidetablist() {
    var wrapper = '.widget_block';
    var header = 'h2';
    var content = '.widget';
    $('.widget_block').removeClass('tablist');
    $('.nowidget').addClass('tablist');
    var title = wrapper + ' ' + header;
    var container_to_hide = wrapper + ' ' + content;
    disable = false;
    $(title).css({
        display: 'none'
    }).each(function (i) {
        if (i == 0) {
            $(wrapper).prepend('<a href="/" class="widgettitle advanced_link active">' + $(this).html() + '</a>')
        } else {
            $('.advanced_link:last').after('<a href="/"class="widgettitle advanced_link">' + $(this).html() + '</a>')
        }
    })
    $(container_to_hide).each(function (i) {
        $(this).addClass('tablist list_' + i);
        if (i != 0) {
            $(this).css({
                display: 'none'
            })
        }
    });
    $('.advanced_link').each(function (i) {
        $(this).bind('click', function () {
            if ($(this).hasClass('active')) {
                return false
            }
            if (disable == false) {
                disable = true;
                $('.advanced_link').removeClass('active');
                $(this).addClass('active');
                $(container_to_hide + ':visible').slideUp(400, function () {
                    $('.list_' + i).slideDown(400, function () {
                        disable = false
                    });
                });
            }
            return false
        });
    });
}

function rss_hover() {
    $('.rssfeed a').append('<span></span>');
    $('.rssfeed a').hover(function () {
        $(this).find('span:hidden').fadeIn(400);
    }, function () {
        $(this).find('span').fadeOut(400);
    });
}

function komentar() {
    $('.comment-block').append('<img class="comments-textarea-tip" src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif"/>');
    $('.user.blog-author').closest('.comment-block').find('p.comment-content').addClass('author-highlight');
}
function search_fade() {
    $('.search_js a').click(function () {
        if ($(this).hasClass('activesearchbar')) {
            $('.headersearch').animate({
                bottom: '25px',
                right: '20px',
                opacity: 0
            }, 400, 'swing', function () {
                $('.activesearchbar').removeClass('activesearchbar');
            });
            return false;
        } else {
            $('.headersearch').animate({
                bottom: '55px',
                right: '147px',
                opacity: 1
            }, 400, 'swing', function () {
                $('.search_js a:not(.activesearchbar)').addClass('activesearchbar');
            });
            return false;
        }
    });
}

function footer() {
    $('.headersearch').css({
        opacity: 0
    });
    $('.jshide').removeClass('jshide');
    var footer = $('.footer').html();
    $('.footer').remove();
    $('#header-wrapper').after('<div class="footer advanced_footer"><div class="footer_bg">' + footer + '</div></div>');
    $('#submenu .options a').click(function () {
        $('.advanced_footer').slideToggle('slow');
        $(this).toggleClass('active');
        return false;
    });
}

function menujenjang() {
    if (!jQuery.browser.msie) {
        $('#nav ul').css({
            opacity: '0.95'
        })
    }
    $('#nav a').removeAttr('title');
    $('#nav ul').css({
        display: 'none'
    });
    $('#nav > li > ul').parent().find('a:first').append('<span class="sub_list">&nbsp;</span>');
    $('#nav ul li > ul').parent().find('a:first').append('<span class="sub_sub_list">&nbsp;</span>');
    $('#nav li').hover(function () {
        $(this).find('ul:first').css({
            visibility: 'visible',
            display: 'none'
        }).show(400)
    }, function () {
        $(this).find('ul:first').css({
            visibility: 'hidden'
        })
    });
}
jQuery(document).ready(function () {
    figcaption($);
    ranabout();
    query();
    relcarou();
    sidetablist();
    rss_hover();
    komentar();
    search_fade();
    footer();
    menujenjang();
    infobalon();
});

var numofpost = 15; thumbnail_mode = 'float' ; summary_noimg = 50; summary_img = 50; img_thumb_height = 150; img_thumb_width = 220;
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2 3=m o();2 l=0;2 5;2 6=m o();E F(a){2 b=G(a.q.H$I.$t,10);7(i=0;i<4;){5=0;3.r=4;l=s.J(s.K()*b);7(j 9 3){8(l==3[j]){5=1}}8(5==0&&l!=0){3[i++]=l}}7(n 9 3){2 p=3[n];2 c=a.q.L[p-1];8("u"9 c){2 d=c.u.$t}2 e=d.M(d.w(\'x://N.y.f/O?v=\')+P,d.w(\'Q\'));R{6[4]=\'x://z.y.f/S/\'+e+\'/0.A\'}T(U){6[4]=\'V://W.X.f/-Y/Z/11/12-13/14/15.A\'}7(k=0;k<c.g.r;k++){8(c.g[k].16==\'17\'){18.19(\'<B C="1a"><a D="\'+c.g[k].D+\'" h="\'+c.h.$t+\'"><z 1b="\'+6[4]+\'" 1c="\'+c.h.$t+\'" C="1d" 1e="1f" 1g="1h"/></a></B>\')}}}}',62,80,'||var|randarray|numofpost|flag|thumburl|for|if|in||||||com|link|title|||||new||Array||feed|length|Math||content||indexOf|http|youtube|img|jpg|li|class|href|function|ranvid|parseInt|openSearch|totalResults|floor|random|entry|substring|www|watch|31|endofvid|try|vi|catch|error|https|lh5|googleusercontent|9Dxl5n_bYPY|T14SAQdh3nI||AAAAAAAABiI|0N7rj2C|GN0|s800|novideo|rel|alternate|document|write|myroundabout|src|alt|imghover|width|220|height|150'.split('|'),0,{}))
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('z Y(a){3 b=A.B(a);3 c=C;k(b.2.4("6://8.7.5/l?v=")!=-1){3 d=b.2.j(b.2.4("6://8.7.5/l?v=")+D,b.2.4("E"))}s{3 d=""};3 e=b.2.j(b.2.4("[m]")+10,b.2.4("[/m]"));k(d==""){3 f=\'<a F="\'+e+\'"><t  n="G" u="Z://12.13.5/-14/15/16/17-18/19/1a.H" o="\'+I+\'p" q="\'+J+\'p"/></a>\'}s{3 f=\'<a F="\'+e+\'"><t  n=G u="6://t.7.5/1b/\'+d+\'/0.H" o="\'+I+\'p" q="\'+J+\'p"/></a>\'};3 g=f;b.2=g}z 1c(a){3 b=A.B(a);3 c="";3 d=C;k(b.2.4("6://8.7.5/l?v=")!=-1){3 e=b.2.j(b.2.4("6://8.7.5/l?v=")+D,b.2.4("E"))}s{3 e=""};3 f=b.2.j(b.2.4("[1d]")+11,b.2.4("[1e]"));3 g=b.2.j(b.2.4("[m]")+10,b.2.4("[/m]"));3 h="";k(e!=""){h=\'<K o="L" q="M"><9 w="1f" y="6://8.7.5/v/\'+e+\'&N=O&P=1&Q=0&R=0"></9><9 w="1g" y="S"></9><9 w="T" y="U"></9><V u="6://8.7.5/v/\'+e+\'&N=O&P=1&Q=0&R=0" 1h="1i/x-1j-1k" T="U" 1l="S" o="L" q="M"></V></K>\'}3 i=h+\'<r n="1m"><r n="1n"><W><X>1o</X></W></r>\'+f+\'</r>\';b.2=i}',62,87,'||innerHTML|var|indexOf|com|http|youtube|www|param||||||||||substring|if|watch|postlink|class|width|px|height|div|else|img|src||name||value|function|document|getElementById|summary_noimg|31|endofvid|href|thumbnail|jpg|img_thumb_width|img_thumb_height|object|635|460|hl|en|fs|rel|autoplay|true|allowscriptaccess|always|embed|h4|span|vidthumb|https|||lh5|googleusercontent|9Dxl5n_bYPY|T14SAQdh3nI|AAAAAAAABiI|0N7rj2C|GN0|s800|novideo|vi|vidplay|starttext|endtext|movie|allowFullScreen|type|application|shockwave|flash|allowfullscreen|content|headings|Description'.split('|'),0,{}))
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('B C(a){4.5(\'<j l="D">\');m(1 i=0;i<E;i++){1 b=a.n.o[i];1 c=b.6.$t;1 d;3(i==a.n.o.p)q;m(1 k=0;k<b.2.p;k++){3(b.2[k].r==\'F\'&&b.2[k].G==\'H/I\'){1 e=b.2[k].6;1 f=b.2[k].7}3(b.2[k].r==\'J\'){d=b.2[k].7;q}}3("s"K b){1 g=b.s.$t}1 h=g.L(g.u("w://M.x.8/N?v=")+O,g.u("P"));Q{9=\'w://y.x.8/R/\'+h+\'/0.z\'}S(T){9=\'U://V.W.8/-X/Y/Z/10-11/12/13.z\'}4.5(\'<A><a 14="15" 7="\'+d+\'" 6="\'+c+\'"><y l="16" 17="\'+9+\'"/></a></A>\')}4.5(\'</j>\')}',62,70,'|var|link|if|document|write|title|href|com|thumburl||||||||||ul||class|for|feed|entry|length|break|rel|content||indexOf||http|youtube|img|jpg|li|function|recvid|recent_posts_with_thumbs|numposts|replies|type|text|html|alternate|in|substring|www|watch|31|endofvid|try|vi|catch|error|https|lh5|googleusercontent|9Dxl5n_bYPY|T14SAQdh3nI|AAAAAAAABiI|0N7rj2C|GN0|s800|novideo|id|balonab|recent_thumb|src'.split('|'),0,{}))
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('3 4=9 f();3 6=0;3 5=9 f();3 7=9 f();l G(a){h(3 i=0;i<a.o.p.2;i++){3 b=a.o.p[i];4[6]=b.q.$t;8("s"H b){3 c=b.s.$t}3 d=c.u(c.w(\'x://I.y.m/J?v=\')+K,c.w(\'L\'));M{7[6]=\'x://z.y.m/N/\'+d+\'/0.A\'}O(P){7[6]=\'Q://R.S.m/-T/U/V/W-X/Y/Z.A\'}8(4[6].2>B)4[6]=4[6].u(0,B)+"...";h(3 k=0;k<b.n.2;k++){8(b.n[k].11==\'12\'){5[6]=b.n[k].C;6++}}}}l 13(){3 a=9 f(0);3 b=9 f(0);3 c=9 f(0);h(3 i=0;i<5.2;i++){8(!D(a,5[i])){a.2+=1;a[a.2-1]=5[i];b.2+=1;c.2+=1;b[b.2-1]=4[i];c[c.2-1]=7[i]}}4=b;5=a;7=c}l D(a,e){h(3 j=0;j<a.2;j++)8(a[j]==e)E 14;E 15}l 16(a){h(3 i=0;i<5.2;i++){8((5[i]==a)||(!4[i])){5.g(i,1);4.g(i,1);7.g(i,1);i--}}3 r=F.17((4.2-1)*F.18());3 i=0;19(i<4.2&&i<1a&&i<10){1b.1c(\'<a C="\'+5[r]+\'" q="\'+4[r]+\'"><z 1d="\'+7[r]+\'" 1e="\'+4[r]+\'" 1f="1g" 1h="1i" 1j="1k"/></a>\');i++;8(r<4.2-1){r++}1l{r=0}}5.g(0,5.2);7.g(0,7.2);4.g(0,4.2)}',62,84,'||length|var|relatedTitles|relatedUrls|relatedTitlesNum|thumburl|if|new||||||Array|splice|for||||function|com|link|feed|entry|title||content||substring||indexOf|http|youtube|img|jpg|35|href|contains_thumbs|return|Math|relvid|in|www|watch|31|endofvid|try|vi|catch|error|https|lh5|googleusercontent|9Dxl5n_bYPY|T14SAQdh3nI|AAAAAAAABiI|0N7rj2C|GN0|s800|novideo||rel|alternate|removeRelatedDuplicates_thumbs|true|false|printRelatedLabels_thumbs|floor|random|while|20|document|write|src|alt|class|imghover|width|120|height|90|else'.split('|'),0,{}))
